﻿using HalconDotNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AIVision.Model.InspectModels
{
    public class InspectResultModel
    {
        /// <summary>
        /// 照片原图
        /// </summary>
        public HObject SourceImage { get; set; }
        /// <summary>
        /// 检查图像
        /// </summary>
        public HObject InspectImage { get; set; }
        /// <summary>
        /// 缺陷集合<名称，缺陷对象>
        /// </summary>
        public Dictionary<string, HObject> Defects { get; set; }
        /// <summary>
        /// 实际分数
        /// </summary>
        public int Score { get; set; }
        /// <summary>
        /// 实际分数
        /// </summary>
        public int OKScore { get; set; }
        /// <summary>
        /// 缺陷名称汇总
        /// </summary>
        public string DefectNameSummary
        {
            get
            {
                string defects = "";
                foreach (var v in Defects)
                {
                    defects += v.Key + ";";
                }
                return defects;
            }
        }

        public string InspectType { get; set; }
    }
}
